#include "command.h"

#include <QString>

Command::Command(QByteArray data)
{
    QString str(data);
    if(str == "ChangeDoorNo") {
        target = UpdateTarget::DoorNo;
    } else if(str == "UpdatePic"){
        target = UpdateTarget::Pic;
    } else if(str == "ChangeQrCode"){
        target = UpdateTarget::QrCode;
    } else if(str == "ChangeInterval") {
        target = UpdateTarget::Interval;
    }
}
